var n = parseInt(prompt("输入一个数字"))
var sum = 0;
while(n > 1) {
  sum += (n+1)/n;
  console.log(n+1 + " " + n);
  n -= 1;
}
alert(sum);